unit PlugInTestTwo;

interface

uses
  Windows, Messages, SysUtils, Classes, Dialogs, Forms, Controls,


  JvPlugin, JvPlgIntf, RzTabs, Graphics;

type
  TTestTwo = class(TJvPlugIn, IMyPluginInterface)
    procedure JvPlugInInitialize(Sender: TObject; var AllowLoad: Boolean);
    procedure JvPlugInDestroy(Sender: TObject);
    procedure JvPlugInCreate(Sender: TObject);
  private
    OldApplication: TApplication;
    OldScreen: TScreen;
    FMainApp: IMyMainAppInterface;
  public
    procedure ShowPlug(Sender: TObject);
    function CloseForm(Sender: TObject): Boolean;

    procedure ShowPlugName(Sender: TObject; FormName: string);
    function GetForm(Sender: TObject; FormName: string): TForm;

    procedure Init(const MainApp: IMyMainAppInterface; HostScreen: TScreen);

    function GetClassForm(FormName: string): TFormClass;
    procedure GetShowModal(FormName:string);

    function GetFormNum:Integer;
end;

function RegisterPlugin: TJvPlugIn; stdcall;

implementation

{$R *.dfm}

// IMPORTANT NOTE: If you change the name of the Plugin container,
// you must set the type below to the same type. (Delphi changes
// the declaration, but not the procedure itself. Both the return
// type and the type created must be the same as the declared type above.


uses FormParent, TestThree,VariableCommon;
function RegisterPlugin: TJvPlugIn;
begin
  Result := TTestTwo.Create(nil);
end;

{ TTestTwo }

function TTestTwo.CloseForm(Sender: TObject): Boolean;
begin

end;

function TTestTwo.GetClassForm(FormName: string): TFormClass;
begin
  Result := TFormClass(TfrmTestThree); //GetClass('T' + FormName)
end;

function TTestTwo.GetForm(Sender: TObject; FormName: string): TForm;
begin

end;

function TTestTwo.GetFormNum: Integer;
begin
   Result:=formNum;
end;

procedure TTestTwo.GetShowModal(FormName: string);
begin

end;

procedure TTestTwo.Init(const MainApp: IMyMainAppInterface;
  HostScreen: TScreen);
begin
  FMainApp := MainApp;
  OldScreen := Screen;
  Screen := HostScreen;
end;

procedure TTestTwo.JvPlugInCreate(Sender: TObject);
begin
  //RegisterClasses([TfrmTestThree]);
end;

procedure TTestTwo.JvPlugInDestroy(Sender: TObject);
begin
  Application.Handle := OldApplication.Handle;
  Screen := OldScreen;
end;

procedure TTestTwo.JvPlugInInitialize(Sender: TObject; var AllowLoad: Boolean);
begin
  OldApplication := Application;
  Application.Handle := HostApplication.Handle;
end;

procedure TTestTwo.ShowPlug(Sender: TObject);
begin

end;

procedure TTestTwo.ShowPlugName(Sender: TObject; FormName: string);
begin

end;

end.
